Prior  Angle Between Two Lines   Next

The slope of a line is the tangent of the angle that the line makes with the $x$-axis as it crosses that axis. If the line never crosses the $x$-axis, it has a slope of zero to indicate that it is parallel to the $x$-axis. The convention is to measure the line angle counter-clockwise starting to the right of where it crosses the axis.

Tan(angle)=slope
Tan(angle)=slope. This is true when the angle is input correctly. The angle must be measured in the positive direction going counter clockwise from the horizontal axis. The upper left panel shows that when the wrong sign of the angle is input that the wrong sign of the slope will be displayed.

 

Example: Suppose we are given information that a line makes an angle of $15$ degrees as it crosses the $x$-axis and that it passes through the point $(4,4).$ What is the equation of the line?
Answer: From the definition of $slope=tan(\alpha)$ where $\alpha$ is the angle to the $x$-axis, we should use a calculator (or table) to see that the $\tan(15deg)=0.268=slope.$ From the slope intercept form, $y=m\cdot x+b,$ we substitute in the known point $(4,4)$ for $x$ and $y$ and solve for $b$. $b=4-0.268\cdot4=2.928.$ The line equation is $y=0.268\cdot x+2.928.$

If we have two lines that cross each other then the difference in their angles, $\alpha_{1}-\alpha_{2},$ is the acute angle between them. $\alpha$ continues to be the angle that the line makes with the $x$-axis. Each angle is given by $\alpha=atan(slope).$ If the slope is negative then $\alpha=atan(slope)+pi.$

Example 2 Suppose two lines with slopes $m_{1}=7,$ and $m_{2}=3.$ What is the acute angle between these lines.
Although the above method is quite easy, there is another method that is often used and in my opinion, with little justification. This section is ignoring an even easier method for solving this problem, which comes from an angle between two vectors. If the angle, $\alpha,$ is our answer and therefore $\alpha = \alpha1-\alpha2,$ then it is also true that I can write the tangent of both sides and preserve the equality: $$\tan(\alpha)=\tan(\alpha1-\alpha2). \tag{1} \label{1}$$ There is a trig identity: $$\tan(a-b)=\frac{{\textstyle \tan(a)-\tan(b)}}{{\textstyle \tan(a)\tan(b)+1}} \tag{2} \label{2}$$ Notice that each slope, $m1$ & $m2,$ corresponds to $\tan(a)$ and $\tan(b)$ in the identity. Therefore by substitution into Equation $\eqref{2}$ of $m1$ for $\tan(a)$ and $m2$ for $\tan(b)$ , we get: $$\tan(\alpha1-\alpha2)=\frac{{\textstyle m1-m2}}{{\textstyle 1+m1\cdot m2}} \tag{3} \label{3}$$ and $$\alpha1-\alpha2=\text{atan}\left|\frac{m1-m2}{1+m1\cdot m2}\right|$$ Absolute value is used because angles in this concept are not negative. Since it is necessary under both methods to use a trig function, it seems easier to use the arctan twice and subtract as in example 2, rather than making a ratio of the slopes.